package org.cytoscape.cytargetlinker.internal.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Node {

	private String id;
	private List<String> identifiers;
	private Map<String, String> properties;
	
	public Node(String id) {
		this.id = id;
		identifiers = new ArrayList<String>();
		properties = new HashMap<String, String>();
	}
	
	public void addProperty(String key, String value) {
		if(!key.equals("") && !properties.containsKey(key)) {
			properties.put(key, value);
		}
	}

	public void addIdentifier(String identifier) {
		if(identifier != null && !identifier.equals("") && !identifiers.contains(identifier)) {
			identifiers.add(identifier);
		}
	}
	
	// SETTERS & GETTERS
	
	public String getId() {
		return id;
	}

	public Map<String, String> getProperties() {
		return properties;
	}

	public List<String> getIdentifiers() {
		return identifiers;
	}
}
